package GUI;

import Market.GenCo;
import Market.Market;
import sim.display.Console;
import sim.display.GUIState;
import sim.engine.SimState;
import sim.engine.Steppable;



public class AWEMGUI extends GUIState {
	
	private Market market;

	public AWEMGUI(SimState state) {
		super(state);
		market=(Market)state;
		
	}

public void updateAgents()
{
	final Steppable updater = new Steppable()
	{	
		public void step(SimState simState) 
		{
			market.updateAgents();			
		}
		
	};
	this.scheduleImmediatelyAfter(updater);
}

 public static void main(String[] args){
	 
	 Market market = new Market(System.currentTimeMillis());       
     market.start();
	 AWEMGUI gui =new AWEMGUI(market);
	 Console c = new Console(gui);
	 c.setVisible(true);
     market.finish();
 }

}
